/*
 *  $Id: ParticleEmitterInfo.cs 1137 2010-09-29 21:21:30Z thenn.erannor $
 *	This file is a part of Ragima CCG.
 *	(C) 2008-2009 Ragima development group.
 *
 *	Licensed under the terms of the GNU GPL License version 2.
 *
 */

using System.Collections.Generic;

using AgateLib.Geometry;

namespace Ragima.UI {
    /// <summary>
    /// Информация об эмиттере частиц.
    /// </summary>
    public class ParticleEmitterInfo {
        private List<IParticleEffect> _effects;

        public ParticleEmitterInfo() {
            Duration = 0;
            Rate = null;
            Generator = null;
            Trajectory = null;
            _effects = null;
        }

        public int Duration;
        public IEnumerable<double> Rate;
        public IEnumerable<Particle> Generator;
        public IEnumerable<PointF> Trajectory;
        public IEnumerable<IParticleEffect> Effects {
            get { return _effects; }
        }

        public void AddEffect(IParticleEffect effect) {
            if (_effects == null)
                _effects = new List<IParticleEffect>();
            _effects.Add(effect);
        }

        public ParticleEmitter Create() {
            return new ParticleEmitter(this);
        }
    }
}
